package _2接口;

public class Child {
	
	// 定义饥饿值 0-100
	private int hungry;
	
	IFeedAble feedman;
	
//	Mother myMother;
//	Father myfather;
	
	boolean isAlive() {
		return this.hungry<100;
		
	}

	public int getHungry() {
		return hungry;
	}

	public void setHungry(int hungry) {
		this.hungry = hungry;
		
		if(this.hungry>60) {
			System.out.println("cryin & find mother");
		 // myMother.feed(this);
		 //	myfather.feed(this);
			feedman.feed(this);
		}
		
	}
	
}
